﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="duty.aspx.cs" Inherits="AnyOffice.general.attend.personal.duty" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>上下班登记</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<script language="JavaScript">
function remark(duty_id)
{
  URL="remark.aspx?duty_id="+duty_id;
  myleft=(screen.availWidth-650)/2;
  window.open(URL,"formul_edit","height=200,width=400,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}
		</script>
	</HEAD>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small" align="center">
				<tr>
					<td class="Big"><img src="/images/menu/attendance.gif" WIDTH="18" HEIGHT="18" align="absMiddle"><span class="big3"> 今日上下班登记 
					（<asp:Literal id="litDutyName" runat="server"></asp:Literal>）</span><br>
					</td>
				</tr>
			</table>
			<asp:Literal id="litPromat" runat="server"></asp:Literal>
			<br>
			<asp:Repeater id="rptMy" runat="server">
				<HeaderTemplate>
					<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="2">
						<tr class="TableHeader">
							<td nowrap align="center">登记次序</td>
							<td nowrap align="center">登记类型</td>
							<td nowrap align="center">规定时间</td>
							<td nowrap align="center">登记时间</td>
							<td nowrap align="center">操作</td>
						</tr>
				</HeaderTemplate>
				<ItemTemplate>
					<tr class="TableData">
						<td nowrap align="center">第<%#Eval("No")%>次登记</td>
						<td nowrap align="center"><%#Convert.ToInt32(Eval("DutyType").ToString()) == 1 ? "上班登记" : "下班登记"%></td>
						<td nowrap align="center">
							<%#Convert.ToDateTime(Eval("DutyTime").ToString()).ToString("HH:mm:ss")%>							
						</td>
						<td nowrap align="center">
							<%#Eval("RegisterTime") == DBNull.Value ? "未登记" : Convert.ToDateTime(Eval("RegisterTime").ToString()).ToString("HH:mm:ss")%>
							<%#Convert.ToInt32(Eval("RegisterFlag").ToString()) == 1 ? "迟到" : ""%>
							<%#Convert.ToInt32(Eval("RegisterFlag").ToString()) == 2 ? "早退" : ""%>
						</td>
						<td nowrap align="center">
							<%#Convert.ToBoolean(Eval("IsRegister").ToString()) == true ? "<a href=\"register.aspx?no=" + Eval("No").ToString() + "\">" + (Convert.ToInt32(Eval("DutyType").ToString()) == 1 ? "上班" : "下班") + "登记</a>" : "" %>
							<%#Eval("RegisterTime") != DBNull.Value ? "已考勤 <a href=\"javascript:remark('" + Eval("DutyId").ToString() + "')\">备注</a>" : "" %>
							<%#Eval("RegisterTime") == DBNull.Value && Convert.ToBoolean(Eval("IsRegister").ToString()) == false ? "无" : "" %>
						</td>
					</tr>
				</ItemTemplate>
				<FooterTemplate>
					</table>
				</FooterTemplate>
			</asp:Repeater>
			<asp:Literal id="litMessage" runat="server"></asp:Literal>
			<br>
		</form>
	</body>
</HTML>
